﻿/*********************************
 $Archive: /Ease/src/Components/Vbyte.SharpOrm/IEntryExtension.cs $
 $Author: qinjunit@gmail.com $
 $Modtime: 09-03-20 10:11 $
 $Revision: 17 $
********************************/
using System.Collections;

namespace Vbyte.SharpOrm
{
    /// <summary>
    /// 实例扩展
    /// </summary>
    public interface IEntryExtension<E> 
        where E:TableEntry, new()
    {
        /// <summary>
        /// 从包含扩展数据的键值词典库设置实例类型和处理扩展数据
        /// </summary>
        /// <param name="entryArray">词典键值对中包含自身属性，
        /// 参见<c>OnEntryMissingProperty</c>委托和从扩展数据绑定实体方法。</param>
        /// <returns></returns>
        E SetWithExtension(DictionaryEntry[] entryArray);

        /// <summary>
        /// 获取相关扩展数据(非自身属性)
        /// </summary>
        /// <returns></returns>
        DictionaryEntry[] GetExtenEntryArray();

        /// <summary>
        /// 移除相关扩展数据实现
        /// </summary>
        void RemoveExtension();
    }
}